import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class demo2 {
    public static void main(String[] args) {
        change s = new change();
        new Thread(() -> {
            for (int i = 0; i < 10; i++) {
                try {
                    s.increase();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        },"A").start();
        new Thread(() -> {
            for (int i = 0; i < 10; i++) {
                try {
                    s.decrease();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }

        },"C").start();
        new Thread(() -> {
            for (int i = 0; i < 10; i++) {
                try {
                    s.decrease();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }

        },"D").start();
        new Thread(() -> {
            for (int i = 0; i < 10; i++) {
                try {
                    s.increase();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }

        },"E").start();
        new Thread(() -> {
            for (int i = 0; i < 10; i++) {
                try {
                    s.decrease();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }

        },"B").start();

    }


class lock{
    private int i = 0;
    Lock lock = new ReentrantLock();
    Condition con = new Condition();
    while(i != 0){
        Lock lock1;
        lock1.a
    }

}
}
